
#ifndef __LRB_H__
#define __LRB_H__

#include <stdbool.h>

typedef enum {
    LITE_RB_EVT_EMPTY = 0,
    LITE_RB_EVT_FULL,
    LITE_RB_EVT_HIGH_MARK,
    LITE_RB_EVT_LOW_MARK
} lite_rb_evt_e;

int lite_rb_init(int buffer_size, int high_mark_val, int low_mark_val, void(*cb)(int lrb, lite_rb_evt_e evt));
void lite_rb_deinit(int lrb);
bool lite_rb_is_full(int lrb);
bool lite_rb_is_empty(int lrb);
int lite_rb_data_size(int lrb);
int lite_rb_empty_size(int lrb);
int lite_rb_write(int lrb, uint8_t *data, int len);
int lite_rb_read(int lrb, uint8_t *data, int len);

#endif
